<me:UIKDADR x:Class="WPFExcelReport.TSKA02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIKDADR.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIKDADR.Resources>
    <StackPanel> 
        <WrapPanel>
            <Button Grid.Column="0" Height="20"  Width="24" Margin="0,0,0,0" 
                    Visibility="{Binding IsMaster,Converter={StaticResource bv}}"
                   Click="ManageCommand"  VerticalAlignment="Top">
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Extend.png" />
                </Button.Background>
            </Button>
        </WrapPanel>
        <TextBox Name="txtSearch"  VerticalAlignment="Top"
                 Text="{Binding KDANAME1,Source={StaticResource vwMaster},Converter={StaticResource gb2312}}"
                   GotFocus="txtSearch_GotFocus" 
                 LostFocus="txtSearch_LostFocus"
                 />
        <Popup  VerticalAlignment="Top"
               StaysOpen="False"
               PlacementTarget="{Binding ElementName=txtSearch}"
               IsOpen="{Binding Path=IsPopUp,ElementName=TV}"
               MaxHeight="300" 
               Height="200"
               Width="Auto" >

            <DataGrid  
                   VerticalAlignment="Top" 
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"  
                   MaxHeight="300"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True" 
                   IsReadOnly="True"
                   x:Name="dlgMaster" 
                   RowDetailsVisibilityMode="Visible"  
                 >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=KDAADRSL}" Header="{Binding Source={Localization:Translate Word=编号}}"  Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=KDANAME1, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=客户名}}"  Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=KDASTRASSE1, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=地址}}"  Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=KDASTRASSE2, Converter={StaticResource gb2312}}"    Width="Auto" />
                </DataGrid.Columns>
            </DataGrid  > 
        </Popup> 
    </StackPanel>
</me:UIKDADR> 
 
